const nodata = require('../tw-lib-base/no-data/props')
const commonProps = require('../tw-lib-base/chart/common-props')
const axisProps = require('../tw-lib-base/chart/axis-props')
const datazoomProps = require('../tw-lib-base/chart/datazoom-props')
const tooltipProps = require('../tw-lib-base/chart/tooltip-props')

module.exports = {
  ...commonProps,

  ...axisProps,
  ...datazoomProps,
  ...tooltipProps,

  isSmooth: {
    type: Boolean,
    default: false,
    name: '是否平滑显示',
    filedType: 'switch'
  },

  // 堆叠数据
  lineName: {
    type: String,
    default: '王飞虎',
    name: '不同类型线条数据',
    nameTip: '英文逗号分隔，在此列表为线图',
    filedType: 'string'
  },
  lineType: {
    type: String,
    default: 'dotted',
    name: '线条类型',
    filedType: 'select',
    options: [
      {
        name: 'solid',
        value: 'solid'
      },
      {
        name: 'dotted',
        value: 'dotted'
      },
      {
        name: 'dashed',
        value: 'dashed'
      }
    ],
    // 是否支持多选，支持多选时default要指定为数组
    multiple: false
  },

  isGradientsLine: {
    type: Boolean,
    default: false,
    name: '是否线条渐变色',
    filedType: 'switch'
  },
  lineStyleWidth: {
    type: String,
    default: '2',
    name: '线宽',
    filedType: 'string'
  },
  lineBorderWidth: {
    type: String,
    default: '',
    name: '描边线宽',
    filedType: 'string'
  },
  lineBorderColor: {
    type: String,
    default: '',
    name: '描边线颜色',
    filedType: 'string'
  },

  grcolors: {
    type: Array,
    default () {
      return [
        '#657df5',
        '#ffb336',
        '#4ac7ff',
        '#2bd3bd',
        '#96e388',
        '#fecd63',
        '#1276ff',
        '#03d6ef',
        '#7114ff',
        '#b62ad1',
        '#f83818',
        '#ff9e13',
        '#ffc513',
        '#5bd917',
        '#17d9b2'
      ]
    },
    name: '渐变颜色调色板',
    nameTip: '图表按此处指定的值循环取色',
    filedType: 'list',
    subType: 'color',
    subDefault: '#2bd3bd',
    max: 20
  },

  useSeries: {
    type: Boolean,
    default: false,
    name: '启用定制series',
    filedType: 'switch'
  },
  funcSeries: {
    type: Function,
    default: '',
    name: '定制series函数',
    filedType: 'function'
  },
  extendOption: {
    type: Boolean,
    default: false,
    name: '扩展定制option',
    filedType: 'switch'
  },
  funcExtOption: {
    type: Function,
    default: '',
    name: '扩展定制option函数',
    filedType: 'function'
  },

  ...nodata
}
